//
//  SharedDBManager.h
//  RealMate_v_2
//
//  Created by DONG HWAN BAE on 10. 11. 7..
//  Copyright 2010 Ajou University. All rights reserved.
//

#import <UIKit/UIKit.h>
#import <CoreData/CoreData.h>

@class track;

@interface SharedDBManager : NSObject {

	//코어데이터 이용에 필요한 변수들
	int sectionInsertCount;
	
@private
    NSFetchedResultsController *fetchedResultsController_;
    NSManagedObjectContext *managedObjectContext_;
}

@property (nonatomic, retain) NSManagedObjectContext *managedObjectContext;
@property (nonatomic, retain) NSFetchedResultsController *fetchedResultsController;

+ (id)sharedInstance;
- (id)init;
- (NSUInteger)retainCount;
- (oneway void)release;
- (id)retain;
-(NSFetchedResultsController*)fetchedResultsController;
-(void)insertNewAddress;
-(NSArray*)selectWithPredicate:(NSPredicate*)predicate;
-(void)deleteWithPredicate:(NSPredicate*)predicate;
-(track*)getDataInstance;
-(void)saveDataInstance:(track*)targetData;
-(void)deleteAllAddress;
-(NSArray*)selecAll;
@end
